package com.example.demo.service;

import com.example.demo.dao.UserDao;
import com.example.demo.pojo.User;
import com.github.pagehelper.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UserService {
    @Resource
    private UserDao userDao;

    public List<User> getAll() {
        return userDao.getAll();
    }
    public List<User> getByName(String username) {
        return userDao.getByName(username);
    }
    public Page<User> getByName2(String username) {
        return userDao.getByName2(username);
    }
}
